import React from 'react'
import styles from './index.module.scss'

export default function EditList({ config, type, onclose }) {
  const list = config[type]
  return (
    <div className={styles.root}>
      {list.map((i) => (
        <div className="list-item" key={i.title} onClick={i.onClick}>
          {i.title}
        </div>
      ))}

      <div className="list-item" onClick={onclose}>
        取消
      </div>
    </div>
  )
}
